<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>PerformanceTimer (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">testing.PerformanceTimer</span>
        <span>Extends</span>
        <span class="fn-name">
          
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Creates a performance timer that runs test functions a number of times to
generate timing samples, and provides performance statistics (minimum,
maximum, average, and standard deviation).

  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="goog.testing.benchmark">Also See:</a></li>
            <li><a href="local_closure_goog_testing_performancetimer.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/local/closure/goog/testing/performancetimer.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td>goog.testing.PerformanceTimer</td><td></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.testing.PerformanceTimer(<span><span class="arg">opt_numSamples</span>,&nbsp;<span class="arg">opt_timeoutInterval</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_numSamples</span>
        : <span class="type">number=</span>
        <div class="entryOverview">Number of times to run the test function;
    defaults to 10.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_timeoutInterval</span>
        : <span class="type">number=</span>
        <div class="entryOverview">Number of milliseconds after which the
    test is to be aborted; defaults to 5 seconds (5,000ms).</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_testing_PerformanceTimer.html">
              goog.testing.PerformanceTimer
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.finishTask_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">finishTask_<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
      </div>


     <div class="entryOverview">
       Finishes the run of a task by creating a result object from samples, in the
format described in <code> run</code>.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>&nbsp;
            Object containing performance stats.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line187">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.getNumSamples"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getNumSamples<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The number of times the test function will be run.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line71">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.getTimeoutInterval"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getTimeoutInterval<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&nbsp;
            The number of milliseconds after which the test times out.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line88">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.handleOptionalDeferred_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">handleOptionalDeferred_<span class="args">(<span class="arg">deferredFactory</span>,&nbsp;<span class="arg">continuationFunction</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Execute a function that optionally returns a deferred object and continue
with the given continuation function only once the deferred object has a
result.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">deferredFactory</span>
        : <span class="type">goog.testing.PerformanceTimer.TestFunction</span>
        <div class="entryOverview">The
    function that optionally returns a deferred object.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">continuationFunction</span>
        : <span class="type">function(</span>)
        <div class="entryOverview">The function that should be called
    after the optional deferred has a result.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line277">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.isDiscardOutliers"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">isDiscardOutliers<span class="args">()</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether outlier values are discarded prior to computing
    stats.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line117">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.run"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">run<span class="args">(<span class="arg">testFn</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
      </div>


     <div class="entryOverview">
       Executes the test function the required number of times (or until the
test run exceeds the timeout interval, whichever comes first).  Returns
an object containing the following:
<pre class="lang-js prettyprint">
  {
    'average': average execution time (ms)
    'count': number of executions (may be fewer than expected due to timeout)
    'maximum': longest execution time (ms)
    'minimum': shortest execution time (ms)
    'standardDeviation': sample standard deviation (ms)
    'total': total execution time (ms)
  }
</pre>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">testFn</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Function">Function</a></span>
        <div class="entryOverview">Test function whose performance is to
    be measured.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>&nbsp;
            Object containing performance stats.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line141">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.runAsyncTask"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">runAsyncTask<span class="args">(<span class="arg">task</span>)</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="class_goog_async_Deferred.html">goog.async.Deferred</a></span>
      </div>


     <div class="entryOverview">
       Executes the test function of the specified task asynchronously. The test
function is expected to take a callback as input and has to call it to signal
that it's done. In addition, if specified, the setUp and tearDown functions
of the task are invoked before and after each invocation of the test
function. Note that setUp/tearDown functions take a callback as input and
must call this callback when they are done.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">task</span>
        : <span class="type"><a href="class_goog_testing_PerformanceTimer_Task.html">goog.testing.PerformanceTimer.Task</a></span>
        <div class="entryOverview">A task describing the test
    function to invoke.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="class_goog_async_Deferred.html">goog.async.Deferred</a></span>&nbsp;
            The deferred result, eventually an object
    containing performance stats.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line210">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.runAsyncTaskSample_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">runAsyncTaskSample_<span class="args">(<span class="arg">testFn</span>,&nbsp;<span class="arg">setUpFn</span>,&nbsp;<span class="arg">tearDownFn</span>,&nbsp;<span class="arg">result</span>,&nbsp;<span class="arg">samples</span>,&nbsp;<span class="arg">testStart</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Runs a task once, waits for the test function to complete asynchronously
and starts another run if not enough samples have been collected. Otherwise
finishes this task.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">testFn</span>
        : <span class="type">goog.testing.PerformanceTimer.TestFunction</span>
        <div class="entryOverview">The test function.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">setUpFn</span>
        : <span class="type">goog.testing.PerformanceTimer.TestFunction</span>
        <div class="entryOverview">The set up
    function that will be called once before the test function is run.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">tearDownFn</span>
        : <span class="type">goog.testing.PerformanceTimer.TestFunction</span>
        <div class="entryOverview">The set up
    function that will be called once after the test function completed.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">result</span>
        : <span>!</span><span class="type"><a href="class_goog_async_Deferred.html">goog.async.Deferred</a></span>
        <div class="entryOverview">The deferred result, eventually an
    object containing performance stats.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">samples</span>
        : <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&gt;
        <div class="entryOverview">The time samples from all runs of the test
    function so far.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">testStart</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">The timestamp when the first sample was started.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line244">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.runTask"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">runTask<span class="args">(<span class="arg">task</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
      </div>


     <div class="entryOverview">
       Executes the test function of the specified task as described in
<code> run</code>. In addition, if specified, the set up and tear down functions of
the task are invoked before and after each invocation of the test function.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">task</span>
        : <span class="type"><a href="class_goog_testing_PerformanceTimer_Task.html">goog.testing.PerformanceTimer.Task</a></span>
        <div class="entryOverview">A task describing the test
    function to invoke.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>&nbsp;
            Object containing performance stats.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line156">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.setDiscardOutliers"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setDiscardOutliers<span class="args">(<span class="arg">discard</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Sets whether to ignore the smallest and the largest values when computing
stats.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">discard</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
        <div class="entryOverview">Whether to discard outlier values.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line108">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.setNumSamples"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setNumSamples<span class="args">(<span class="arg">numSamples</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Sets the number of times the test function will be run.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">numSamples</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">Number of times to run the test function.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line80">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.prototype.setTimeoutInterval"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setTimeoutInterval<span class="args">(<span class="arg">timeoutInterval</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Sets the number of milliseconds after which the test times out.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">timeoutInterval</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>
        <div class="entryOverview">Timeout interval in ms.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line97">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_testing_PerformanceTimer.html">
              goog.testing.PerformanceTimer
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.testing.PerformanceTimer.prototype.discardOutliers_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">discardOutliers_</span>
        : 
     </div>


     <div class="entryOverview">
       Whether to discard outliers (i.e. the smallest and the largest values)
from the sample set before computing statistics.  Defaults to false.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line64">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.testing.PerformanceTimer.prototype.numSamples_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">numSamples_</span>
        : 
     </div>


     <div class="entryOverview">
       Number of times the test function is to be run; defaults to 10.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line48">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.testing.PerformanceTimer.prototype.timeoutInterval_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">timeoutInterval_</span>
        : 
     </div>


     <div class="entryOverview">
       Number of milliseconds after which the test is to be aborted; defaults to
5,000ms.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line56">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Static Methods</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.PerformanceTimer.createResults"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.PerformanceTimer.</span><span class="entryName">createResults<span class="args">(<span class="arg">samples</span>)</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>
      </div>


     <div class="entryOverview">
       Creates a performance timer results object by analyzing a given array of
sample timings.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">samples</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span>&gt;
        <div class="entryOverview">The samples to analyze.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object">Object</a></span>&nbsp;
            Object containing performance stats.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line294">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



<h2>Static Properties</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>





  <a name="goog.testing.PerformanceTimer.TestFunction"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.PerformanceTimer.</span><span class="entryName">TestFunction</span>
        : 
     </div>


     <div class="entryOverview">
       A test function whose performance should be measured or a setUp/tearDown
function. It may optionally return a deferred object. If it does so, the
test harness will assume the function is asynchronous and it must signal
that it's done by setting an (empty) result on the deferred object. If the
function doesn't return anything, the test harness will assume it's
synchronous.

     </div>

  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_performancetimer.js.source.html#line315">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package testing</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="testing.PerformanceTimer"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
